package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 主机框数据表 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceMachineFrame对象", description = "主机框数据表")
public class DeviceMachineFrame extends Model<DeviceMachineFrame> {

  private static final long serialVersionUID = 1L;

  // "主机框")
  @TableId(value = "machine_frame_id", type = IdType.AUTO)
  private Integer machineFrameId;

  // "设备id")
  private Integer deviceId;

  // "设备类型")
  private String productType;

  // "设备sn")
  private String frameSn;

  // "协议类型")
  private String protocolVersion;

  // "数据类型")
  private Integer dataType;

  // "位置")
  private String location;

  // "子机框数据个数")
  private Integer racksCount;

  // "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  // "更新时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime updateTime;

  @Override
  public Serializable pkVal() {
    return this.machineFrameId;
  }

}
